#include <stdio.h>
int main() {
    int input = 0;
    int fir = 1;
    int sec = 2;
    int thi = 3;
    int i = 0;

    scanf("%d", &input);

    if(1 == input)
    {
        printf("1");
    }
    else if(2 == input)
    {
        printf("2");
    }
    else 
    {
        for(i = 3; i <= input; i++)
        {
            
            thi = fir + sec;
            fir = sec;
            sec = thi;
        }
        printf("%d", thi);
    }
    
    return 0;
}
